import Vue from "vue"
import VueRouter from "vue-router"

Vue.use(VueRouter)


// 引入路由   (404  503)?
import ErrorRoutes from "@/views/errorpage/route"

// 引入路由 (登录注册忘记密码)
import SigninRoutes from "@/views/signin/route"

// 引入首页路由
import MainRoutes from "@/views/main/route"


const routes = [
    {
        path: "/",
        redirect: "/guide"
    },
    {
        path: "/guide",
        name: "guide",
        component: () => import("@/views/guide/guide.vue")
    },
    ...ErrorRoutes,
    ...SigninRoutes,
    ...MainRoutes,
    {
        path: "*",
        redirect: {
            name: "guide"
        }
    }
]

const router = new VueRouter({
    routes,
    mode: "hash"
})
export default router